Skip to content

fix(dashboard): drop dead cost UI, make Agent runs page mobile-friendly - #146

Merged
MathurAditya724 merged 1 commit into
mainfrom
cursor/agent-runs-cost-mobile
Aug 7, 2026
Merged

fix(dashboard): drop dead cost UI, make Agent runs page mobile-friendly#146
MathurAditya724 merged 1 commit into
mainfrom
cursor/agent-runs-cost-mobile

Conversation

@MathurAditya724

Copy link
Copy Markdown
Member

Summary

Two asks: surface cost, and fix the Agent runs page on mobile.

Cost — the honest answer

I dug into whether we track cost and we can't recover it from what we have. I fetched the raw Flue ?view=history for live sessions (getsentry/craft#864, getsentry/cli#1371) and there is no token/usage/cost anywhere — not on messages, not on parts (reasoning/text/dynamic-tool only), not on settlements. Flue computes cost internally (PromptUsage.cost.total) but only exposes it via in-container call returns and OpenTelemetry spans — never in the history/updates views the dashboard reads. All live runs report totalCost: 0.

Rather than keep showing a perpetually-empty "$-", this removes the dead cost UI:

  • the always-empty Cost column on the Agent runs table
  • the cost chips on the detail page (header total, per-session sidebar, active-session summary)

The tool-call and message counts already convey "how much work happened", which is the signal people actually wanted.

Note: real per-run cost is possible but is its own project — all models route through OpenRouter, so we'd capture generation IDs in-container and query OpenRouter per-generation cost. Happy to do that as a follow-up if you want true spend tracking. (Account-total spend via OpenRouter's key API is also a one-call option.)

Mobile — Agent runs page

The screenshot showed the header wrapping, buttons crowding, and a 7-column table forcing horizontal scroll. Now:

  • Header + search/per-page rows stack instead of colliding on a phone
  • Below md, the table is replaced by tap-through cards (entity, status, agent/model, session + message counts, updated); the full table stays on desktop

Test plan

  • vitest run — 123 passed
  • tsc --noEmit clean, biome check clean
  • pnpm build succeeds
  • Visual: confirm the cards render well on a real phone width

Made with Cursor

Cost was never real: the Flue runtime doesn't expose token usage or cost in
the history the dashboard reads (confirmed against live raw `view=history` —
no usage on messages, parts, or settlements), so every run showed "$-" / an
empty figure. Removed the always-empty cost column and the detail-page cost
chips; the tool-call and message counts already convey how much work happened.

Agent runs page is now responsive: the header and search/per-page rows stack
instead of colliding on a phone, and the wide 7-column table is replaced by
tap-through cards below md while the full table stays on desktop.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
jared 2bc1dcb Aug 07 2026, 02:36 PM

@MathurAditya724
MathurAditya724 merged commit a49da94 into main Aug 7, 2026
17 of 18 checks passed
@MathurAditya724
MathurAditya724 deleted the cursor/agent-runs-cost-mobile branch August 7, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant